Optimal. Leaf size=81 \[ \frac{a \sin ^7(c+d x)}{7 d}-\frac{2 a \sin ^5(c+d x)}{5 d}+\frac{a \sin ^3(c+d x)}{3 d}+\frac{a \cos ^8(c+d x)}{8 d}-\frac{a \cos ^6(c+d x)}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.125666, antiderivative size = 81, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.185, Rules used = {2834, 2564, 270, 2565, 14} \[ \frac{a \sin ^7(c+d x)}{7 d}-\frac{2 a \sin ^5(c+d x)}{5 d}+\frac{a \sin ^3(c+d x)}{3 d}+\frac{a \cos ^8(c+d x)}{8 d}-\frac{a \cos ^6(c+d x)}{6 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2834
Rule 2564
Rule 270
Rule 2565
Rule 14
Rubi steps
\begin{align*} \int \cos ^5(c+d x) \sin ^2(c+d x) (a+a \sin (c+d x)) \, dx &=a \int \cos ^5(c+d x) \sin ^2(c+d x) \, dx+a \int \cos ^5(c+d x) \sin ^3(c+d x) \, dx\\ &=-\frac{a \operatorname{Subst}\left (\int x^5 \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{d}+\frac{a \operatorname{Subst}\left (\int x^2 \left (1-x^2\right )^2 \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac{a \operatorname{Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\sin (c+d x)\right )}{d}-\frac{a \operatorname{Subst}\left (\int \left (x^5-x^7\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac{a \cos ^6(c+d x)}{6 d}+\frac{a \cos ^8(c+d x)}{8 d}+\frac{a \sin ^3(c+d x)}{3 d}-\frac{2 a \sin ^5(c+d x)}{5 d}+\frac{a \sin ^7(c+d x)}{7 d}\\ \end{align*}
Mathematica [A] time = 0.276744, size = 87, normalized size = 1.07 \[ -\frac{a (-8400 \sin (c+d x)+560 \sin (3 (c+d x))+1008 \sin (5 (c+d x))+240 \sin (7 (c+d x))+2520 \cos (2 (c+d x))+420 \cos (4 (c+d x))-280 \cos (6 (c+d x))-105 \cos (8 (c+d x)))}{107520 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.029, size = 84, normalized size = 1. \begin{align*}{\frac{1}{d} \left ( a \left ( -{\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{2} \left ( \cos \left ( dx+c \right ) \right ) ^{6}}{8}}-{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{6}}{24}} \right ) +a \left ( -{\frac{\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{6}}{7}}+{\frac{\sin \left ( dx+c \right ) }{35} \left ({\frac{8}{3}}+ \left ( \cos \left ( dx+c \right ) \right ) ^{4}+{\frac{4\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{3}} \right ) } \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.05539, size = 97, normalized size = 1.2 \begin{align*} \frac{105 \, a \sin \left (d x + c\right )^{8} + 120 \, a \sin \left (d x + c\right )^{7} - 280 \, a \sin \left (d x + c\right )^{6} - 336 \, a \sin \left (d x + c\right )^{5} + 210 \, a \sin \left (d x + c\right )^{4} + 280 \, a \sin \left (d x + c\right )^{3}}{840 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.14169, size = 192, normalized size = 2.37 \begin{align*} \frac{105 \, a \cos \left (d x + c\right )^{8} - 140 \, a \cos \left (d x + c\right )^{6} - 8 \,{\left (15 \, a \cos \left (d x + c\right )^{6} - 3 \, a \cos \left (d x + c\right )^{4} - 4 \, a \cos \left (d x + c\right )^{2} - 8 \, a\right )} \sin \left (d x + c\right )}{840 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 12.2315, size = 136, normalized size = 1.68 \begin{align*} \begin{cases} \frac{a \sin ^{8}{\left (c + d x \right )}}{24 d} + \frac{8 a \sin ^{7}{\left (c + d x \right )}}{105 d} + \frac{a \sin ^{6}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{6 d} + \frac{4 a \sin ^{5}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{15 d} + \frac{a \sin ^{4}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{4 d} + \frac{a \sin ^{3}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{3 d} & \text{for}\: d \neq 0 \\x \left (a \sin{\left (c \right )} + a\right ) \sin ^{2}{\left (c \right )} \cos ^{5}{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.24026, size = 159, normalized size = 1.96 \begin{align*} \frac{a \cos \left (8 \, d x + 8 \, c\right )}{1024 \, d} + \frac{a \cos \left (6 \, d x + 6 \, c\right )}{384 \, d} - \frac{a \cos \left (4 \, d x + 4 \, c\right )}{256 \, d} - \frac{3 \, a \cos \left (2 \, d x + 2 \, c\right )}{128 \, d} - \frac{a \sin \left (7 \, d x + 7 \, c\right )}{448 \, d} - \frac{3 \, a \sin \left (5 \, d x + 5 \, c\right )}{320 \, d} - \frac{a \sin \left (3 \, d x + 3 \, c\right )}{192 \, d} + \frac{5 \, a \sin \left (d x + c\right )}{64 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]